import axiosInstance from "./axiosInstance";

//按照pos 位置信息查询 栏目列表
export function queryByPos(pos) {
    return axiosInstance.get('f/channel/queryByPos?pos='+pos)
}

//获得栏目 by Id
export function get(id) {
    return axiosInstance.get('f/channel/get?id='+id)
}

//获取所有栏目下的最新文章列表
export function getNew() {
    return axiosInstance.get('f/article/getList')
}

//获取文章列表 ByChannelId
export function getArticlesByChannelId(channelId) {
    return axiosInstance.get('f/article/getList?channelId='+channelId)
}

//获取前几条数据
export function getTop(channelId,top) {
    return axiosInstance.get('f/article/getList?channelId='+channelId+"&limit="+top);
}

//获取置顶数据列表
export function getUp() {
    return axiosInstance.get('f/article/getUp');
}

//获取指定文章ById
export function getArticle(id) {
    return axiosInstance.get('f/article/get?id='+id);
}